package com.zbf.core.config;

import com.zbf.core.interceptor.AutherInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 作者: LCG
 * 日期: 2020/6/1 08:51
 * 描述:
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Autowired
    private AutherInterceptor autherInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(autherInterceptor).addPathPatterns("/**");
    }


}
